/* eslint-disable */
import request from '@/utils/request'
// 商品库存查询列表
export function productstocklist(params) {
  return request({
    url: '/shop/product/stock/sku/list',
    method: 'get',
    params
  })
}
// 商品库存分布
export function productstockfb(params) {
  return request({
    url: '/shop/product/stock/sku/' + params.sku_id,
    method: 'get',
    params
  })
}
// 创建商品入库
export function productstockIncreate(data) {
  return request({
    url: `/shop/product/stock/in/shop`,
    method: 'post',
    data
  })
}
// 出入库-选择商品-商品sku列表
export function productstockskus(params) {
  return request({
    url: `/shop/product/skus`,
    method: 'get',
    params
  })
}
// 入库列表
export function productstockinlist(params) {
  return request({
    url: '/shop/product/stock/in/list',
    method: 'get',
    params
  })
}
// 创建商品出库
export function productstockOutcreate(data) {
  return request({
    url: `/shop/product/stock/out/shop`,
    method: 'post',
    data
  })
}
// 出库列表
export function productstockoutlist(params) {
  return request({
    url: '/shop/product/stock/out/list',
    method: 'get',
    params
  })
}
// 出入库详情
export function productstockdetail(params) {
  return request({
    url: '/shop/product/stock/' + params.id + '/detail',
    method: 'get',
    params
  })
}
// 采购列表
export function getcaigouList(params) {
  return request({
    url: '/purchase',
    method: 'get',
    params
  })
}
//采购审核
export function caigouShenhe(params) {
  return request({
    url: '/purchase/' + params.id + '/audit',
    method: 'put',
    params
  })
}
// 批量审核
export function caigouShenhes(params) {
  return request({
    url: '/purchase/batchAudit',
    method: 'put',
    params
  })
}
//采购详情
export function getcaigouDetails(params) {
  return request({
    url: '/purchase/'+params.id+'/show',
    method: 'get',
    params
  })
}
//主单的采购详情
export function getzhucaigouDetails(params) {
  return request({
    url: '/purchase/'+params.id,
    method: 'get',
    params
  })
}
//创建采购单
export function createcaigouList(data) {
  return request({
    url: '/purchase',
    method: 'post',
    data
  })
}
